package cn.tedu._01mvcboot01.controller;

import cn.tedu._01mvcboot01.pojo.dto.UpdateCarDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class CarController {
    @PostMapping("v1/car/add")
    @ResponseBody
    public String addCar(String brand, String license, double price) {
        return "添加车辆成功！" + brand + "-" + license + "-" + price;
    }



    @RequestMapping("v1/car/update")
    @ResponseBody
    public String updateCar(UpdateCarDTO updateCarDTO) {
        System.out.println(updateCarDTO+"更新完成");
        return "更新车辆成功";
    }
}
